﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="product_channel.aspx.cs"
    Inherits="V5_EShop._Template.Default.ProductChannel" %>

<%@ Import Namespace="V5_Common" %>
<%@ Register Src="Controls/getHeader2.ascx" TagName="getHeader2" TagPrefix="mm" %>
<%@ Register Src="Controls/getDismode.ascx" TagName="getDismode" TagPrefix="mm" %>
<%@ Register Src="Controls/getFooter.ascx" TagName="getFooter" TagPrefix="mm" %>
<%@ Register Src="Controls/getProductSingleClassList.ascx" TagName="getProductClass"
    TagPrefix="mm" %>
<%@ Register Src="Controls/getSearch.ascx" TagName="getSearch" TagPrefix="mm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="_Template/<%=config.TemplatePath %>/css/init.css">
    <link rel="stylesheet" type="text/css" href="_Template/<%=config.TemplatePath %>/css/Businessshirt.css">
    <link href="/_template/<%=config.TemplatePath %>/css/head.css" rel="stylesheet" type="text/css">
    <title>
        <%=config.SiteTitle%>-<%=productclass.ClassName %></title>

    <script type="text/javascript" src="/Scripts/jquery_min.js"></script>

    <script>

        var ad = {

            o: null, // 存放滚动的UL

            cloneImg: null, //克隆UL的第一个图片

            adY: 0, //滚动值

            distan: 0, //每个图片的高度



            init: function(obj) {

                if (!obj.style.top) {

                    obj.style.top = '0px';

                }

                this.cloneImg = obj.firstChild.cloneNode(true); //克隆第一个节点

                if (this.cloneImg.nodeType == 3) this.cloneImg = obj.firstChild.nextSibling.cloneNode(true); //除IE外第一个节点为文本节点,这里做点调整,让克隆节点还是指向第一个元素

                obj.appendChild(this.cloneImg); //让克隆的节点放入最后

                this.adY = parseInt(obj.style.top);

                this.o = obj;

                this.distan = this.cloneImg.offsetHeight; //获取高度

                this.moveCtrl();

            },

            moveCtrl: function() {

                if (Math.abs(this.adY) == this.o.offsetHeight - this.distan) this.adY = 0; //当到达底部,让滚动直接跳回最上面

                if (Math.abs(this.adY) % this.distan == 0) {

                    setTimeout('ad.moveCtrl()', 2000); //对每个图片做停留,也就是延迟函数的循环

                } else {

                    setTimeout('ad.moveCtrl()', 10); //运动循环

                }

                --this.adY;

                ad.o.style.top = this.adY + 'px';

            }

        }

        window.onload = function() {

            var obj = document.getElementById('adul');

            ad.init(obj); //直接把UL放入类里,就可以用了,类已基本封装好

        }

        function ChangeOrder() {
            var url = $("#ddlgoorder").val();
            window.location.href = url;
        }
    </script>

</head>
<body>
    <div id="page">
        <mm:getHeader2 ID="Header1" runat="server" />
        <div class="content">
            <mm:getSearch ID="getSearch" runat="server" />
            <div class="leftbox">
                <div class="Categories">
                    <mm:getProductClass ID="getProductClass1" runat="server" />
                </div>
                <div class="Advertisement">
                    <a href="#" target="_blank">
                        <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/pic_01.gif" width="209"
                            height="300"></a></div>
                <div class="Advertisement">
                    <a href="#" target="_blank">
                        <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/pic_02.gif" width="209"
                            height="300"></a></div>
            </div>
            <div class="rightbox">
                <div class="jspic">
                    <div id="ad">
                        <ul id="adul">
                            <li><a href="#">
                                <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/1.gif" /></a></li>
                            <li><a href="#">
                                <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/2.gif" /></a></li>
                            <li><a href="#">
                                <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/3.gif" /></a></li>
                            <li><a href="#">
                                <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/4.gif" /></a></li>
                        </ul>
                    </div>
                </div>
                <div class="Advertisement_01">
                    <a href="#" target="_blank">
                        <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/pic_03.gif" width="215"
                            height="303"></a></div>
                <div class="clear">
                </div>
                <span class="guild">首页 >
                    <%=productclass.ClassName %></span>
                <form id="form1" runat="server">
                <div class="shop_px">
                    <span class="shop_span01">显示方式：</span>
                    <%-- 列表方式--%>
                    <a href="/product-channel-<%=_classid %>-2-<%=_orderid %>-<%=_pageid %>.<%=config.UrlRewrite %>">
                        <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/icon_01.gif" width="18"
                            height="17" title="列表方式">
                    </a>
                    <%--图文方式--%>
                    <a href="/product-channel-<%=_classid %>-1-<%=_orderid %>-1.aspx">
                        <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/icon_02.gif" width="18"
                            height="17" title="图文方式"></a> <span class="shop_span01">排序方式：</span>
                    <%--按上架日期--%>
                    <a href="/product-channel-<%=_classid %>--<%=_showid %>-1-1.aspx">
                        <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/icon_03.gif" width="18"
                            height="17" title="按上架日期"></a>
                    <%--按销量由高到低--%>
                    <a href="/product-channel-<%=_classid %>-<%=_showid %>-2-1.aspx">
                        <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/icon_04.gif" width="20"
                            height="17" title="按销量由高到低"></a>
                    <%--按价格从低到高--%>
                    <a href="/product-channel-<%=_classid %>-<%=_showid %>-3-1.aspx">
                        <img src="_Template/<%=config.TemplatePath%>/images/Manshirt/icon_06.gif" width="17"
                            height="17" title="按价格从低到高">
                    </a>
                    <select name="ddlgoorder" id="ddlgoorder" class="select_1" onchange="ChangeOrder();">
                        <option value="/product-channel-<%=_classid %>-<%=_showid %>-1-1.aspx">
                            上架新品</option>
                        <option value="/product-channel-<%=_classid %>-<%=_showid %>-2-1.aspx">
                            按销量由高到低</option>
                        <option value="/product-channel-<%=_classid %>-<%=_showid %>-3-1.aspx">
                            按价格从低到高</option>
                        <option value="/product-channel-<%=_classid %>-<%=_showid %>-4-1.aspx">
                            按价格从高到低</option>
                    </select>
                    <div class="clear">
                    </div>
                </div>
                <ul class="ul_pic">
                    <%--列表样式一--%>
                    <asp:Repeater ID="rpList1" runat="server">
                        <ItemTemplate>
                            <li><a href="product-details-<%# DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.UrlRewrite %>"
                                target="_blank">
                                <img src="/<%# this.getPic(DataBinder.Eval(Container.DataItem,"ProductBigPic"),"s")%>"
                                    width="150" height="200"></a><a href="product-details-<%# DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.UrlRewrite %>"><%#Input.CutString(DataBinder.Eval(Container.DataItem,"ProductName").ToString(),20,"") %></a><br />
                                <span class="gray_font">市场价<a>￥<%#DataBinder.Eval(Container.DataItem, "ProductMarketPrice")%></a></span>
                                团购<span class="red_font">￥<%#DataBinder.Eval(Container.DataItem, "ProductMemberPrice")%></span></li>
                        </ItemTemplate>
                    </asp:Repeater>
                    <div class="clear">
                    </div>
                </ul>
                <%--  列表样式二--%>
                <asp:Repeater ID="rpList2" runat="server">
                    <ItemTemplate>
                        <div class="ul_pic01">
                            <a href="product-details-<%# DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.UrlRewrite %>"
                                target="_blank">
                                <img class="sp" height="200" src=" <%# this.getPic(DataBinder.Eval(Container.DataItem,"ProductBigPic"),"s") %>"
                                    width="150"></a> <span class="nr">
                                        <h2>
                                            <a href="product-details-<%# DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.UrlRewrite %>"
                                                target="_blank">
                                                <%#DataBinder.Eval(Container.DataItem,"ProductName") %></a></h2>
                                        <ul class="ul_pic_01">
                                            <asp:HiddenField ID="hfProductFields" runat="server" Value='<%#Bind("ProductSingleFields") %>' />
                                            <asp:Repeater ID="rpSingleList" runat="server">
                                                <ItemTemplate>
                                                    <li><span>
                                                        <%#DataBinder.Eval(Container.DataItem,"m1") %>：</span><%#DataBinder.Eval(Container.DataItem,"m2") %></li>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                            <div class="clear">
                                            </div>
                                        </ul>
                                    </span><span class="ul_pic_02">
                                        <ul>
                                            <li><span>市场价：</span><a class="no">
                                                <%#DataBinder.Eval(Container.DataItem, "ProductMarketPrice")%>元</a></li>
                                            <li><span class="Price">团购价：￥<%#DataBinder.Eval(Container.DataItem, "ProductMemberPrice")%></span></li>
                                            <li><span>商品级别：</span><br />
                                                <span>
                                                
                                                    <%# Get_Level(this.Get_Comment(DataBinder.Eval(Container.DataItem, "ID")).Level1, @"<img height=""16"" src=""/_template/" + config.TemplatePath + @"/images/Businessshirt/huangguan_lan.gif"" width=""16"">")%>
                                                   
                                                  <%--  <img height="16" src="/_template/<%=config.TemplatePath%>/images/Businessshirt/huangguan_lan.gif"
                                                        width="16"><img height="16" src="/_template/<%=config.TemplatePath%>/images/Businessshirt/huangguan_lan.gif"
                                                            width="16"><img height="16" src="/_template/<%=config.TemplatePath%>/images/Businessshirt/huangguan_lan.gif"
                                                                width="16"><img height="16" src="/_template/<%=config.TemplatePath%>/images/Businessshirt/huangguan_lan.gif"
                                                                    width="16"><img height="16" src="/_template/<%=config.TemplatePath%>/images/Businessshirt/huangguan_lan.gif"
                                                                        width="16">--%></span><div class="clear">
                                                                        </div>
                                            </li>
                                            <li><span>共有<%# this.Get_Comment(DataBinder.Eval(Container.DataItem, "ID")).CountInfo%>条信息</span><br />
                                                <input type="button" name="button" id="button" value="" class="button_01" onclick="javascript:window.location.href='/product-details-<%# DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.UrlRewrite %>'" />
                                            </li>
                                        </ul>
                                    </span>
                            <div class="clear">
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
                <div class="shop_px_foot">
                    <webdiyer:AspNetPager ID="Pager" runat="server" HorizontalAlign="Center" Width="100%"
                        ShowPageIndexBox="Always" EnableUrlRewriting="true" OnPageChanged="Pager_PageChanged"
                        PageSize="12">
                    </webdiyer:AspNetPager>
                </div>
                </form>
            </div>
            <div class="clear">
            </div>
        </div>
        <%--  配送方式--%>
        <mm:getDismode ID="getDismode1" runat="server" />
        <%--网站底部--%>
        <mm:getFooter ID="getFooter1" runat="server" />
    </div>
</body>
</html>
